package o2o.dao.TO.sync;

import lombok.Data;
import lombok.experimental.Accessors;
import o2o.dao.PO.company.postman.ShopSignCompanyInfo;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Jahnke【1029777564@qq.com】
 * @ClassName ShopSignDeliverComTO
 * @Description: 签约商户签约配送公司数据同步
 * @date 2019/8/8 10:54
 * @Version 1.0
 */
@Data
@Accessors(chain = true)
public class ShopSignDeliverComTO {

    private Long id;
    private Long shopId;
    private Long companyId;

    private List<ShopSignDeliverComMoneyTO> deliveryMoney = new ArrayList<>();

    public ShopSignCompanyInfo convert2Info() {
        ShopSignCompanyInfo info = new ShopSignCompanyInfo();
        info.setCompanyId(this.companyId).setShopId(this.getShopId())
                .setApplyTime(System.currentTimeMillis()).setDelFlag(0).setStatus(1).setMoney(0D).setCreateTime(System.currentTimeMillis());
        return info;
    }
}
